revZipAddItemWithData
Type
command
Summary
Adds an item to a zip archive and puts the specified data into it
Syntax
revZipAddItemWithData <archivePath>, <itemName>, <variableName>
Description
Use the revZipAddItemWithData command to put data from a LiveCode variable into a file in a zip archive. The archive must have first been opened with revZipOpenArchive.
Parameters
Name | Type | Description |
---|---|---|
archivePath | The absolute path to the zip archive to add the file to. | |
itemName | The unique name of the item to create in the zip archive. | |
variableName | The name of a variable in your LiveCode program containing data to place into the item in the zip archive. If the revZipAddItemWithData command encounters an error then the result will be set to an error code beginning with "ziperr", otherwise the result will be empty. |
Examples
-- Add a text file directly to the zip file, using the UTF-8
-- text encoding
local tContent, tData
put "Hello, world!" into tContent
put textEncode(tContent, "utf-8") into tData
revZipAddItemWithData tArchive, "hello-world.txt", "tData"
Related
command: revZipAddUncompressedItemWithFile, revZipOpenArchive, revZipAddUncompressedItemWithData, revZipAddItemWithFile, revZipReplaceItemWithData
Compatibility and Support
Introduced
LiveCode 2.7.3
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile